/* 
 * 页面组件名称
 */
App.Data.Element = {
    SECTIONS:{
        HOME:'home',
        YELPAGES:'yelpages',
        GROUPING:'grouping',
        CUSTOM:'custom',
        VISIT:'visit'
    },
    ARTICLES:{
    },
    DOMS:{
        HOME:[],
        CUSTOM:{
            custom_name:'input#custom-input-name',
            custom_addr:'input#custom-input-addr',
            person_group:'div#custom-person-group',
            product_group:'div#custom-product-group',
            maturity:'div#custom-maturity',
            visits:'div#custom-visits'
        }
    },
    NAVS:{
    },
    DATA_HEADER:'data-header',
    DATA_NAV:'data-nav'
};

App.Data.Doms = (function (lng) {
    var _ele = App.Data.Element;
    var $ = lng.dom;
    var $_doms = [];

    for (var key in _ele.SECTIONS) {
        var $_section = $('section#' + _ele.SECTIONS[key]);
        var dom_selectors = _ele.DOMS[key];
        if (dom_selectors) {
            var array = [];
            array.section = $_section;
            for (var selector in dom_selectors) {
                array[selector] = $_section.find(dom_selectors[selector]);
            }
            $_doms[key.toLowerCase()] = array;
        }
    }

    return $_doms;

})(Lungo);